<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
	<meta charset="utf-8" />
	<title>修改应用菜单 - {$Think.lang.cfg_website}</title>
	<meta content="width=device-width, initial-scale=1.0" name="viewport" />
	<meta content="" name="description" />
	<meta content="" name="author" />
	<!-- BEGIN GLOBAL MANDATORY STYLES -->
	<link href="{$NOW_THEME_URL}/Assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/plugins/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/css/style-metro.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/css/style.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/css/themes/{:session('skin')}.css" rel="stylesheet" type="text/css" id="style_color"/>
	
	<link rel="shortcut icon" href="favicon.ico" />
	<script src="__PUBLIC__/Js/jquery.min.js" type="text/javascript"></script>
	<script src="__PUBLIC__/Plugins/EtNodeIcon/JS/etNodeIcon.js"></script>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Plugins/EtNodeIcon/CSS/etNodeIcon.css">
	<style type="text/css">
		#resultIcon  {
			margin:5px;
		}
		#resultIcon img {
			width:50px;
			height:50px;
		}
	</style>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
	<!-- BEGIN HEADER -->
	<include file="Public:header" />
	<!-- END HEADER -->
	<!-- BEGIN CONTAINER -->
	<div class="page-container">
		<!-- BEGIN SIDEBAR -->
		<div class="page-sidebar nav-collapse collapse">
			<!-- BEGIN SIDEBAR MENU -->        
			<ul class="page-sidebar-menu">
            	<li>
					<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
					<div class="sidebar-toggler hidden-phone"></div>
					<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
				</li>
                {$menu_tree}
            </ul>
			<!-- END SIDEBAR MENU -->
		</div>
		<!-- END SIDEBAR -->
		<!-- BEGIN PAGE -->
		<div class="page-content">
			<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<div id="portlet-config" class="modal hide">
				<div class="modal-header">
					<button data-dismiss="modal" class="close" type="button"></button>
					<h3>portlet Settings</h3>
				</div>
				<div class="modal-body">
					<p>Here will be a configuration form</p>
			  </div>
			</div>
			<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<!-- BEGIN PAGE CONTAINER-->
			<div class="container-fluid">
				<!-- BEGIN PAGE HEADER-->   
			  <div class="row-fluid">
					<div class="span12">
                    	<div class="clear">&nbsp;</div>                        
						<ul class="breadcrumb">
							<li>
								<i class="icon-home"></i>
								<a href="__APP__">{$Think.lang.cfg_page_home}</a> 
								<span class="icon-angle-right"></span>
							</li>
							<li>
								<a href="__URL__/menu">应用菜单管理</a> 
								<span class="icon-angle-right"></span>
						  </li>
							<li><a href="#">修改应用菜单 </a></li>
						</ul>
					</div>
				</div>
				<!-- END PAGE HEADER-->
				<!-- BEGIN PAGE CONTENT-->
				<div class="row-fluid">
					<div class="span12">
						<!-- BEGIN VALIDATION STATES-->
						<div class="portlet box purple">
							<div class="portlet-title">
								<div class="caption"><i class="icon-plus"></i>修改应用菜单 </div>
								<div class="tools">
									<a href="javascript:;" class="collapse"></a>
								</div>
							</div>
							<div class="portlet-body form">
								<!-- BEGIN FORM-->
								<form action="__URL__/menuEdit" method="post" id="adcontentForm" class="form-horizontal">
                                	<input type="hidden" name="id"    value="{$detail.id}"/>
                                	<input type="hidden" name="key"    value="hdmin"/>
                                    <div class="alert alert-error hide">
                                    <button class="close" data-dismiss="alert"></button>
                                        {$Think.lang.cfg_form_err_allform}
                                    </div>
                                    <div class="alert alert-success hide">
                                        <button class="close" data-dismiss="alert"></button>
                                        {$Think.lang.cfg_form_ok_allform}
                                    </div>
                                    
                                    <div class="control-group">
										<label class="control-label">所属节点
                                        <span class="required">*</span></label>
										<div class="controls">
                                        	<select name="nodeid" class="span6 m-wrap" >
                                              <option value="">{$Think.lang.cfg_form_tis_select}</option>
                                              {$options}
                                            </select>
										</div>
									</div>

                                    <div class="control-group">
										<label class="control-label">菜单名称
                                        <span class="required">*</span></label>
										<div class="controls">
                                            <input type="text" name="title" value="{$detail.title}" data-required="1" class="span6 m-wrap"/><br/>
										</div>
									</div>
            
                                    
                                     <div class="control-group">
										<label class="control-label">链接</label>
										<div class="controls">
											<input type="text" name="url" value="{$detail.url}" data-required="1" class="span6 m-wrap"/>
										</div>
									</div>
									
									<div class="control-group">
										<label class="control-label">图标</label>
										<div class="controls">
											<div id="resultIcon">
												<input type="hidden" name="icon" value="{$detail.icon}"/>
												<img src="__PUBLIC__/Plugins/EtNodeIcon/{$detail.icon}"/>
											</div>
											<a data-toggle="modal" id="selectIcon" class="btn blue">
												<i class="icon-plus"></i> 选择图标
											</a>
											<div id="showIcon">
											</div>
										</div>
									</div>
									
									<div class="control-group">
										<label class="control-label">排序号</label>
										<div class="controls">
											<input type="text" name="sort" value="{$detail.sort}" data-required="1" class="span6 m-wrap" value="1"/>
										</div>
									</div>
                                    
                                    <div class="control-group">
										<label class="control-label">类型
                                        </label>
										<div class="controls">
											<label class="radio">
											<div class="radio"><span>
											<input type="radio" value="1" name="type" 
                                            <eq name="detail.type" value="1">checked</eq> />
                                            </span></div>菜单
											</label>
                                            
                                            <label class="radio">
											<div class="radio"><span>
											<input type="radio" value="2" name="type" 
											<eq name="detail.type" value="2">checked</eq> /></span>
                                            </div>快捷方式
											</label>
										</div>
									</div>
									
									<div class="control-group" id="config" style="display:block">
										<label class="control-label">菜单配置</label>
										<div class="controls">
											<div style="width:100px;display:inline-block;line-height:45px;">显示最小化按钮:</div>
											<input type="radio" name="config[min]" value="1" <eq name="config.min" value="1">checked</eq> />是&nbsp;&nbsp;&nbsp;
											<input type="radio" name="config[min]" value="0" <eq name="config.min" value="0">checked</eq> />否<br/>
											
											<div style="width:100px;display:inline-block;line-height:45px;">显示最大化按钮:</div>
											<input type="radio" name="config[max]" value="1" <eq name="config.min" value="1">checked</eq> />是&nbsp;&nbsp;&nbsp;
											<input type="radio" name="config[max]" value="0" <eq name="config.min" value="0">checked</eq> />否<br/>
											
											<div style="width:100px;display:inline-block;line-height:45px;">宽度:</div>
											<input type="text" name="config[width]" class="span4 m-wrap" value="{$config.width|default=800}"/><br/>
											
											<div style="width:100px;display:inline-block;line-height:45px;">高度:</div>
											<input type="text" name="config[height]" class="span4 m-wrap" value="{$config.height|default=600}"/><br/>
											
											<div style="width:100px;display:inline-block;line-height:45px;">开启锁屏:</div>
											<input type="radio" name="config[lock]" value="1" <eq name="config.lock" value="1">checked</eq> />是&nbsp;&nbsp;&nbsp;
											<input type="radio" name="config[lock]" value="0" <eq name="config.lock" value="0">checked</eq> />否<br/>
											
											<div style="width:100px;display:inline-block;line-height:45px;">是否调节尺寸:</div>
											<input type="radio" name="config[resize]" value="1" <eq name="config.resize" value="1">checked</eq> />是&nbsp;&nbsp;&nbsp;
											<input type="radio" name="config[resize]" value="0" <eq name="config.resize" value="0">checked</eq> />否<br/>
											
											<div style="width:100px;display:inline-block;line-height:45px;">是否拖动位置:</div>
											<input type="radio" name="config[drag]" value="1" <eq name="config.drag" value="1">checked</eq> />是&nbsp;&nbsp;&nbsp;
											<input type="radio" name="config[drag]" value="0" <eq name="config.drag" value="0">checked</eq> />否<br/>
											
										</div>
									</div>
                                    
                                    <div class="control-group">
										<label class="control-label">默认权限菜单
                                        </label>
										<div class="controls">
											<label class="radio">
											<div class="radio">
												<span>
												<input type="radio" value="1" name="permiss" 
												<eq name="detail.permiss" value="1">checked</eq> />
												</span>
											</div>是
											</label>
                                            
                                            <label class="radio">
											<div class="radio">
												<span>
												<input type="radio" value="2" name="permiss" 
												<eq name="detail.permiss" value="2">checked</eq> />
												</span>
                                            </div>否
											</label>
										</div>
									</div>                               
                                   
                                    <div class="control-group">
										<label class="control-label">{$Think.lang.cfg_form_ele_remark}</label>
										<div class="controls">
                                          <textarea rows="3" name="remark" class="large m-wrap">{$detail.remark}</textarea>
										</div>
									</div>
                                    
									<div class="form-actions">
										<button type="submit" class="btn purple">{$Think.lang.cfg_form_ele_submit}</button>
										<button type="reset" class="btn">{$Think.lang.cfg_form_ele_reset}</button>
									</div>
								</form>
								<!-- END FORM-->
							</div>
						</div>
						<!-- END VALIDATION STATES-->
					</div>
				</div>
				<!-- END PAGE CONTENT-->         
		  </div>
			<!-- END PAGE CONTAINER-->
		</div>
		<!-- END PAGE -->
	</div>
	<!-- END CONTAINER -->
	<!-- BEGIN FOOTER -->
	<include file="Public:footer" />
	<!-- END FOOTER -->
	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
	<!-- BEGIN CORE PLUGINS -->
	<script src="{$NOW_THEME_URL}/Assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	<!--[if lt IE 9]>
	<script src="{$NOW_THEME_URL}/Assets/plugins/excanvas.min.js"></script>
	<script src="{$NOW_THEME_URL}/Assets/plugins/respond.min.js"></script>  
	<![endif]-->   
	 
	<script src="{$NOW_THEME_URL}/Assets/plugins/jquery.cookie.min.js" type="text/javascript"></script>
	<!-- END CORE PLUGINS -->
	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/plugins/jquery-validation/dist/jquery.validate.min.js"></script>
	<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/plugins/jquery-validation/dist/additional-methods.min.js"></script>
    <script type="text/javascript" src="{$NOW_THEME_URL}/Assets/plugins/jquery-validation/localization/messages_zh.js"></script>
	<!-- END PAGE LEVEL PLUGINS -->
	<!-- BEGIN PAGE LEVEL STYLES -->
	<script src="{$NOW_THEME_URL}/Assets/scripts/app.js"></script>
	<script src="{$NOW_THEME_URL}/Assets/scripts/node/add.js"></script>
    <script type="text/javascript" src="{$NOW_THEME_URL}/Assets/plugins/artdialog/jquery.artdialog.js?skin=bootstrap"></script>
	<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/plugins/artdialog/plugins/iframeTools.js"></script>
	<!-- END PAGE LEVEL STYLES -->    
	<script type="text/javascript">

		var ABS_URL_Theme = "{$NOW_THEME_URL}/";
		
		var vMessage = {};//表单的验证提示语言包
		vMessage.name_required     = '{$Think.lang.nod_form_validata_name_required}';
		vMessage.title_required    = '{$Think.lang.nod_form_validata_title_required}';
	
		jQuery(document).ready(function() {   
			App.init();
			adcontentForm.init();	
			
			$('select[name=nodeid]').bind('change',function(){
				getActions();
		   });
			
			openConfig();
			
			//选择图标
		   var myConfig = {
					selectId:'selectIcon', //选择按钮Id
					//点击图标事件
					clickIcon:function(obj){
						var src = obj.children('img').attr('src');
						var source = obj.children('img').attr('source');	
						$('#resultIcon').html('<input type="hidden" name="icon" value="'+source+'"/><img src="'+src+'"/>');
					},
					pluginPath:'__PUBLIC__/Plugins/EtNodeIcon/' //插件位置
				};
			
			$('#showIcon').EtNodeIcon(myConfig);
		});
		
		function getActions(){
			
			var action = $("select[name=nodeid]").find("option:selected").attr("url");
			$("input[name=url]").val(action);
		}
		
		function openConfig(){
			
			/* var checked = $("input[name=type]:checked").val();
			if(checked == 2){
				$('#config').show();
			}else{
				$('#config').hide();
			} */
		}
		
	</script>
	<!-- END JAVASCRIPTS -->   
</body>
<!-- END BODY -->
</html>